package com.ibangnuo.manage.dao.employee;

import com.ibangnuo.framework.domain.Agent;
import com.ibangnuo.framework.domain.CommercialTenant;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @Author:ly
 * @Data:2019/12/27 17:23
 * @Verdion:1.0
 */
public interface CommercialRepository extends JpaRepository<CommercialTenant,String> {
    List<CommercialTenant> findByAgentIdAndIsDelete(String agentId, int isDelete);
    CommercialTenant findByUserId(String userId);

    CommercialTenant findByPId(String pId);


    void deleteByUserId(String Id);

    List<CommercialTenant> findByAgentId(String id);

    List<CommercialTenant> findByEmployeeId(String id);

    CommercialTenant findByMchId(String mchId);

    int countByIsDelete(int isDelete);

    int countByAgentIdAndIsDelete(String agentId,int isDelete);

}
